package 函数式编程.imooc函数思想

object variable {
  def main(args: Array[String]): Unit = {
    val x = 10
    val y = 20
    val res = x + y
    println(s"结果是:$res")

    lazy val a = res * 10
    println()

    val res2 = a * 10
    println(s"惰性值被计算:${res2}")
  }

}
